package com.ourteam.system.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Thu Jul 12 16:34:06 CST 2018
 * Auto Generate Date : 2018-07-20 12:05:01
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class SystemEventLogBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id", com.ourteam.system.dao.ISysEventLogDAO.Id);

        mappedDaoFields.put("eventLevel",
            com.ourteam.system.dao.ISysEventLogDAO.EventLevel);

        mappedDaoFields.put("eventTypeId",
            com.ourteam.system.dao.ISysEventLogDAO.EventTypeId);

        mappedDaoFields.put("eventSource",
            com.ourteam.system.dao.ISysEventLogDAO.EventSource);

        mappedDaoFields.put("eventContent",
            com.ourteam.system.dao.ISysEventLogDAO.EventContent);

        mappedDaoFields.put("eventTime",
            com.ourteam.system.dao.ISysEventLogDAO.EventTime);

        mappedDaoFields.put("eventOperator",
            com.ourteam.system.dao.ISysEventLogDAO.EventOperator);

        mappedDaoFields.put("eventOperatorId",
            com.ourteam.system.dao.ISysEventLogDAO.EventOperatorId);

        mappedDaoFields.put("eventOperatorClient",
            com.ourteam.system.dao.ISysEventLogDAO.EventOperatorClient);

        mappedDaoFields.put("eventTypeCode",
            com.ourteam.system.dao.ISysEventLogDAO.EventTypeCode);

        mappedDaoFields.put("eventTypeName",
            com.ourteam.system.dao.ISysEventLogDAO.EventTypeName);

        mappedDaoFields.put("eventTypeStatus",
            com.ourteam.system.dao.ISysEventLogDAO.EventTypeStatus);

        mappedDaoFields.put("eventDomainId",
            com.ourteam.system.dao.ISysEventLogDAO.EventDomainId);

        mappedDaoFields.put("eventDomainCode",
            com.ourteam.system.dao.ISysEventLogDAO.EventDomainCode);

        mappedDaoFields.put("eventData",
            com.ourteam.system.dao.ISysEventLogDAO.EventData);

        mappedDaoFields.put("operatorName",
            com.ourteam.system.dao.ISysEventLogDAO.OperatorName);

        mappedDaoFields.put("eventSourceId",
            com.ourteam.system.dao.ISysEventLogDAO.EventSourceId);
    }

    private com.ourteam.system.dao.SysEventLog sysEventLog;

    public SystemEventLogBean() {
        super();

        this.sysEventLog = new com.ourteam.system.dao.SysEventLog();
    }

    public SystemEventLogBean(com.ourteam.system.dao.SysEventLog sysEventLog) {
        super();

        this.sysEventLog = sysEventLog;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(sysEventLog);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.system.dao.SysEventLog convertToSysEventLog() {
        return this.sysEventLog;
    }

    public com.ourteam.system.dao.SysEventLog convertTo() {
        return this.sysEventLog;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.sysEventLog.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.sysEventLog.setId(id);
    }

    /**
     * Get eventLevel
     *
     * @return String
     */
    public String getEventLevel() {
        return (String) this.sysEventLog.getEventLevel();
    }

    /**
     * Set eventLevel
     *
     * @parameter String
     */
    public void setEventLevel(String eventLevel) {
        this.sysEventLog.setEventLevel(eventLevel);
    }

    /**
     * Get eventTypeId
     *
     * @return long
     */
    public long getEventTypeId() {
        return (long) this.sysEventLog.getEventTypeId();
    }

    /**
     * Set eventTypeId
     *
     * @parameter long
     */
    public void setEventTypeId(long eventTypeId) {
        this.sysEventLog.setEventTypeId(eventTypeId);
    }

    /**
     * Get eventSource
     *
     * @return String
     */
    public String getEventSource() {
        return (String) this.sysEventLog.getEventSource();
    }

    /**
     * Set eventSource
     *
     * @parameter String
     */
    public void setEventSource(String eventSource) {
        this.sysEventLog.setEventSource(eventSource);
    }

    /**
     * Get eventContent
     *
     * @return String
     */
    public String getEventContent() {
        return (String) this.sysEventLog.getEventContent();
    }

    /**
     * Set eventContent
     *
     * @parameter String
     */
    public void setEventContent(String eventContent) {
        this.sysEventLog.setEventContent(eventContent);
    }

    /**
     * Get eventTime
     *
     * @return java.util.Date
     */
    public java.util.Date getEventTime() {
        return (java.util.Date) this.sysEventLog.getEventTime();
    }

    /**
     * Set eventTime
     *
     * @parameter java.util.Date
     */
    public void setEventTime(java.util.Date eventTime) {
        this.sysEventLog.setEventTime(eventTime);
    }

    /**
     * Get eventOperator
     *
     * @return String
     */
    public String getEventOperator() {
        return (String) this.sysEventLog.getEventOperator();
    }

    /**
     * Set eventOperator
     *
     * @parameter String
     */
    public void setEventOperator(String eventOperator) {
        this.sysEventLog.setEventOperator(eventOperator);
    }

    /**
     * Get eventOperatorId
     *
     * @return long
     */
    public long getEventOperatorId() {
        return (long) this.sysEventLog.getEventOperatorId();
    }

    /**
     * Set eventOperatorId
     *
     * @parameter long
     */
    public void setEventOperatorId(long eventOperatorId) {
        this.sysEventLog.setEventOperatorId(eventOperatorId);
    }

    /**
     * Get eventOperatorClient
     *
     * @return String
     */
    public String getEventOperatorClient() {
        return (String) this.sysEventLog.getEventOperatorClient();
    }

    /**
     * Set eventOperatorClient
     *
     * @parameter String
     */
    public void setEventOperatorClient(String eventOperatorClient) {
        this.sysEventLog.setEventOperatorClient(eventOperatorClient);
    }

    /**
     * Get eventTypeCode
     *
     * @return String
     */
    public String getEventTypeCode() {
        return (String) this.sysEventLog.getEventTypeCode();
    }

    /**
     * Get eventTypeName
     *
     * @return String
     */
    public String getEventTypeName() {
        return (String) this.sysEventLog.getEventTypeName();
    }

    /**
     * Get eventTypeStatus
     *
     * @return String
     */
    public String getEventTypeStatus() {
        return (String) this.sysEventLog.getEventTypeStatus();
    }

    /**
     * Get eventDomainId
     *
     * @return long
     */
    public long getEventDomainId() {
        return (long) this.sysEventLog.getEventDomainId();
    }

    /**
     * Get eventDomainCode
     *
     * @return String
     */
    public String getEventDomainCode() {
        return (String) this.sysEventLog.getEventDomainCode();
    }

    /**
     * Get eventData
     *
     * @return String
     */
    public String getEventData() {
        return (String) this.sysEventLog.getEventData();
    }

    /**
     * Set eventData
     *
     * @parameter String
     */
    public void setEventData(String eventData) {
        this.sysEventLog.setEventData(eventData);
    }

    /**
     * Get operatorName
     *
     * @return String
     */
    public String getOperatorName() {
        return (String) this.sysEventLog.getOperatorName();
    }

    /**
     * Get eventSourceId
     *
     * @return long
     */
    public long getEventSourceId() {
        return (long) this.sysEventLog.getEventSourceId();
    }

    /**
     * Set eventSourceId
     *
     * @parameter long
     */
    public void setEventSourceId(long eventSourceId) {
        this.sysEventLog.setEventSourceId(eventSourceId);
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof SystemEventLogBean) == false) {
            return false;
        } // end if

        SystemEventLogBean other = (SystemEventLogBean) obj;

        boolean isEqual = false;

        com.ourteam.system.dao.SysEventLog tempSysEventLog = other.convertToSysEventLog();

        if ((tempSysEventLog == null) || (this.sysEventLog == null)) {
            isEqual = false;
        } else if ((tempSysEventLog == this.sysEventLog) ||
                tempSysEventLog.equals(this.sysEventLog)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static SystemEventLogBean[] toArray(
        com.ourteam.system.dao.SysEventLog[] aSysEventLogs) {
        return toArray(aSysEventLogs, null);
    }

    public static SystemEventLogBean[] toArray(
        com.ourteam.system.dao.SysEventLog[] aSysEventLogs,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aSysEventLogs)) {
            return new SystemEventLogBean[0];
        }

        int length = aSysEventLogs.length;

        SystemEventLogBean[] beans = new SystemEventLogBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new SystemEventLogBean(aSysEventLogs[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i], new Object[] { aSysEventLogs[i] });
            }
        }

        return beans;
    }
}
